package com.runvp.service.biz.handler;

import com.runvp.common.build.BuildAppUtil;
import com.runvp.common.enums.EnableStatus;
import com.runvp.common.util.EnumsUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class InitHandler {

    public void startInit(){
        String status = EnableStatus.ENABLE.getCode();
        //初始化枚举
        EnumsUtil.initEnums();
        //初始化下拉列表
        BuildAppUtil.putDlModelKey("biz_goods_category","id","name", status);
        //场地设置
        BuildAppUtil.putDlModelKey("biz_site","id","name",status);
        //产品分类设置
        BuildAppUtil.putDlModelKey("biz_goods_category","id","name",status);
        //产品设置
        BuildAppUtil.putDlModelKey("biz_goods","id","name",status);
        //产品价格设置
        BuildAppUtil.putDlModelKey("biz_goods_price","id","name",status);
        //充值套餐设置
        BuildAppUtil.putDlModelKey("biz_recharge_package","id","name",status);
        //合作商
        BuildAppUtil.putDlModelKey("sys_user","user_id","user_name","0", "AND user_id != 1 AND del_flag = {{condition0}}");
    }
}
